package com.xiexin.setmeals.service.impl;

import com.xiexin.setmeals.domain.SetmealGroup;
import com.xiexin.setmeals.mapper.SetmealGroupMapper;
import com.xiexin.setmeals.service.ISetmealGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 套餐和组的中间Service业务层处理
 * 
 * @author xiexin
 * @date 2022-03-26
 */
@Service
public class SetmealGroupServiceImpl implements ISetmealGroupService 
{
    @Autowired
    private SetmealGroupMapper setmealGroupMapper;

    /**
     * 查询套餐和组的中间
     * 
     * @param id 套餐和组的中间主键
     * @return 套餐和组的中间
     */
    @Override
    public SetmealGroup selectSetmealGroupById(Long id)
    {
        return setmealGroupMapper.selectSetmealGroupById(id);
    }

    /**
     * 查询套餐和组的中间列表
     * 
     * @param setmealGroup 套餐和组的中间
     * @return 套餐和组的中间
     */
    @Override
    public List<SetmealGroup> selectSetmealGroupList(SetmealGroup setmealGroup)
    {
        return setmealGroupMapper.selectSetmealGroupList(setmealGroup);
    }

    /**
     * 新增套餐和组的中间
     * 
     * @param setmealGroup 套餐和组的中间
     * @return 结果
     */
    @Override
    public int insertSetmealGroup(SetmealGroup setmealGroup)
    {
        return setmealGroupMapper.insertSetmealGroup(setmealGroup);
    }

    /**
     * 修改套餐和组的中间
     * 
     * @param setmealGroup 套餐和组的中间
     * @return 结果
     */
    @Override
    public int updateSetmealGroup(SetmealGroup setmealGroup)
    {
        return setmealGroupMapper.updateSetmealGroup(setmealGroup);
    }

    /**
     * 批量删除套餐和组的中间
     * 
     * @param ids 需要删除的套餐和组的中间主键
     * @return 结果
     */
    @Override
    public int deleteSetmealGroupByIds(Long[] ids)
    {
        return setmealGroupMapper.deleteSetmealGroupByIds(ids);
    }

    /**
     * 删除套餐和组的中间信息
     * 
     * @param id 套餐和组的中间主键
     * @return 结果
     */
    @Override
    public int deleteSetmealGroupById(Long id)
    {
        return setmealGroupMapper.deleteSetmealGroupById(id);
    }
}
